package cn.hsj.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component("ipProperties")
@ConfigurationProperties(prefix = "tools.ip") //设置从配置文件拿属性注入的 前缀信息， 这样才能通过前缀找对应对的 配置信息  映射到类的属性上
public class IpProperties {

    /**
     *  日志显示周期
     */

    private Long cycle = 5L;

    /**
     * 是否周期内重置数据
     */
    private Boolean cycleRest = false;

    /**
     * 日志输出模式 detail 详细模式 simple:极简模式
     */

    private  String model = "detail";


    public enum  LogModel{
        DETAIL("detail"),
        SIMPLE("simple");
        private String value;
        LogModel(String value){
            this.value = value;
        }
        public String getValue(){
            return value;
        }
    }

    public Long getCycle() {
        return cycle;
    }

    public void setCycle(Long cycle) {
        this.cycle = cycle;
    }

    public Boolean getCycleRest() {
        return cycleRest;
    }

    public void setCycleRest(Boolean cycleRest) {
        this.cycleRest = cycleRest;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }
}
